﻿Module Uteis
    Public Function VerificaSeDiaUtil(ByVal dtDia As Date) As Boolean

        If Not (dtDia.DayOfWeek = DayOfWeek.Saturday Or dtDia.DayOfWeek = DayOfWeek.Sunday) Then
            Return True
        Else
            Return False
        End If

    End Function
    Public Function RetornaDescricaoDiaSemana(ByVal DiaSemana As DayOfWeek) As String

        Try
            Select Case DiaSemana
                Case DayOfWeek.Monday
                    Return "Segunda-Feira"
                Case DayOfWeek.Tuesday
                    Return "Terça-Feira"
                Case DayOfWeek.Wednesday
                    Return "Quarta-Feira"
                Case DayOfWeek.Thursday
                    Return "Quinta-Feira"
                Case DayOfWeek.Friday
                    Return "Sexta-Feira"
                Case DayOfWeek.Saturday
                    Return "Sábado"
                Case Else
                    Return ""
            End Select

        Catch ex As Exception
            Throw New Exception("Exceção no método 'RetornaDescricaoDiaSemana'." & Environment.NewLine & Environment.NewLine & ex.Message)
        End Try

    End Function
End Module
